<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="shortcut icon" href="#{facesContext.externalContext.context.contextPath}/imagenes/book_open.ico" />
        <link href="#{facesContext.externalContext.context.contextPath}/css/default.css" rel="stylesheet" type="text/css" />
        <link href="#{facesContext.externalContext.context.contextPath}/css/tableLayout.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="#{facesContext.externalContext.context.contextPath}/js/javascript.js"/>
        <title>
            <ui:insert name="title">
                IGM
            </ui:insert>
        </title>
    </h:head>

    <h:body>
        <table cellspacing="10px">
            <tr>
                <td id="top">
                    <ui:insert name="session">
                        <h:form>
                        <p:idleMonitor onactive="sessionTimeOutDialog.show();" timeout="#{session.maxInactiveInterval * 1000}" />
                        <p:dialog header="#{general.sesionCaducada} " widgetVar="sessionTimeOutDialog"
                                  modal="true" closable="false" width="400" visible="false">
                            <h:outputText value="#{general.msgSesionCaducada}" />
                            <input id="confirmBackToLogin" type="button" value="#{general.aceptar}"
                                   onclick="window.location='#{facesContext.externalContext.requestContextPath}/faces/index.xhtml';" />
                        </p:dialog>
                        </h:form>
                    </ui:insert>
                    <ui:insert name="top">
                        <h:form id="frmMenu">
                            <p:growl showDetail="true"/>
                  			
                  			 <h:panelGrid id="pngMenuSession" columns="1" width="900px">
                                <h:panelGroup id="pngGrupoSession" >
                                    <h:panelGrid columns="8" cellspacing="5px" border="0">
                                    <h:graphicImage id="imgContruccion" url="/imagenes/escudo.png" />
                                        <h:outputText id="outMnuSsUsuario" value="#{general.usuario}: #{menuOP.usuario.nombre} " styleClass="texto_sesion"/>
                                        <h:outputText id="outMnuSsPeriodo" value="#{general.periodo}: " styleClass="texto_sesion"/>
                                        <h:outputText id="outMnuSsHoraE" value="#{general.horaEntrada}:" styleClass="texto_sesion"/>
                                        <h:outputText id="outMnuSsHoraF" value="#{general.horaSalida}: " styleClass="texto_sesion"/>
                                        <p:commandButton actionListener="#{loginOP.cerrarSession}" value="#{general.cerrarSesion}" oncomplete="redireccionar('#{sistemaOP.ipServidor}')"/>
                                    </h:panelGrid>
                                </h:panelGroup>
                            </h:panelGrid>
                            
                  			  <p:menubar id="pMenu">
 								<c:forEach items="#{menuOP.rolGeneral}" var="rol" >
                                            <p:menuitem value="#{rol.nombre}" url=" #{facesContext.externalContext.requestContextPath}/faces#{rol.link}"/>
                                        </c:forEach>
                                </p:menubar>
                        </h:form>
                    </ui:insert>
                </td>
            </tr>
            <tr>
                <td id="content">
                    <ui:insert name="content">Content</ui:insert>
                </td>
            </tr>
            <tr>
                <td id="bottom">
                    <ui:insert name="bottom">
                        <h:form id="frmPie">
                            <div align="center">
                                <h:outputText id="outContenido" value="#{general.derechosCopia}" styleClass="texto_pie"/>
                            </div>
                        </h:form>
                    </ui:insert>
                </td>
            </tr>
        </table>
    </h:body>

</html>
